using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using DAO;
using DTO;

namespace BUS
{
    public class PhieuKhamBUS
    {
        public DataTable LayBangPhieuKham()
        {
            DataTable dt = new DataTable();
            PhieuKhamDAO pkDao = new PhieuKhamDAO();
            dt = pkDao.LayBangPhieuKham();
            return dt;
        }


        public DataTable LayMaPhieuKham()
        {
            DataTable dt = new DataTable();
            PhieuKhamDAO pkDao = new PhieuKhamDAO();
            dt = pkDao.LayMaPhieuKham();
            return dt;
        }

        public DataTable LayThongTinHoaDon()
        {
            DataTable dt = new DataTable();
            PhieuKhamDAO pkDao = new PhieuKhamDAO();
            dt = pkDao.ThongTinHoaDon();
            return dt;
        }

        public void SuaTienThuoc(PhieuKhamDTO pkDto)
        {
            PhieuKhamDAO pkDao = new PhieuKhamDAO();
            pkDao.SuaTienThuoc(pkDto);
        }

        public void ThemPhieuKham(PhieuKhamDTO pkDto)
        {
            PhieuKhamDAO pkDao = new PhieuKhamDAO();
            pkDao.ThemPhieuKham(pkDto);
        }

        public void XoaPhieuKham(string maPhieuKham)
        {
            PhieuKhamDAO pkDao = new PhieuKhamDAO();
            pkDao.XoaPhieuKham(maPhieuKham);
        }

        //public void SuaPhieuKham(PhieuKhamDTO pkDto)
        //{
        //    PhieuKhamDAO pkDao = new PhieuKhamDAO();
        //    pkDao.SuaPhieuKham(pkDto);
        //}

        //Tìm kiếm bệnh nhân theo mã bệnh nhân
        public DataTable TraCuuPhieuKhamTheoMaPhieuKham(string maPhieuKham)
        {
            DataTable dt = new DataTable();
            PhieuKhamDAO pkDao = new PhieuKhamDAO();
            dt = pkDao.TimKiemTheoMaPhieuKham(maPhieuKham);
            return dt;
        }
        public DataTable TraCuuBNTheoNgay(string _ngaykham)
        {
            DataTable dt = new DataTable();
            PhieuKhamDAO pkdao = new PhieuKhamDAO();
            dt = pkdao.LayBangBenhNhanTheoNgayKham(_ngaykham);
            return dt;
        }
    }
}
